-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear breakpoints so that gdb will not single step #533
Conversation
Signed-off-by: liangzhen <[email protected]> Change-Id: I7a4a24972cfa2ddc307a5f06fe3fd5380794719f
@lz-bro while this simplification is useful I think it would not hurt to check both cases (the one where debugger does single step and the one when it doesn't). Do you have any reason for changing the test aside from simplication? (Likethis test fails in your environment, maybe) |
Our hardware only supports count 1 and it is hard-wired to 1. #516 riscv-tests/debug/gdbserver.py Lines 2004 to 2017 in a7c1a56
|
@lz-bro but this renders this specific test incompatible with your HW. At least this is my understanding. The intention of this test is to check that the processor is halted after exactly 2 instructions.
This is expected behavior for GDB. My point is that if we set an "icount" trigger set to with icount = 2, both scenario should work (the one where we don't remove breakpoint and the one where we do remove it). |
@lz-bro ahh.. I've missed this part of this test:
I see. So my point is that maybe the deletion of breakpoint should be conditional too? |
Yes, the deletion of breakpoint could be conditional, I think this will not affect anything. Like "monitor riscv icount clear", if self.target.icount_limit == 1, there is will no triggers to clear. |
riscv-tests/debug/gdbserver.py
Lines 2134 to 2141 in 67e7759
If there's a breakpoint set, gdb will send vCont;s:0;c:0, so cpu will execute 2 instructions when count is set to 1, with breakpoints cleared, gdb will send vCont;c.